package org.fujene.constants;

/**
 * A list of constants.
 */
public class Constants{
	private Constants(){/* NO INSTANCE */}

	// default port using RPC connection
	public static final int INDEX_PORT = 23500;
	public static final int SEARCH_PORT = 23501;
	public static final int PEER_PORT = 23502;

	public static final int MEMORY_TYPE_KINDS = 7;

	public static final int MEMORY_TYPE_DICT = 0;
	public static final int MEMORY_TYPE_INVINDEX = 1;
	public static final int MEMORY_TYPE_CONTENTS = 2;
	public static final int MEMORY_TYPE_SKIPPTR = 3;
	public static final int MEMORY_TYPE_SKIPPTRCONT = 4;
	public static final int MEMORY_TYPE_APPENDIX = 5;
	public static final int MEMORY_TYPE_KEYVALUE = 6;

	// skip pointer interval
	// public static final int SKIPPTR_INTERVAL = 6;
	public static final int SKIPPTR_INTERVAL = 5;

	// length of each elements' byte stream
	public static final int BYTE_LOCALPTR = 3;
	public static final int BYTE_BLOCKPTR = 3;
	public static final int BYTE_RELATIVEBLOCKPTR = 1;
	public static final int BYTE_LONGPTR = 8;
	public static final int BYTE_GLOBALPTR = 6;
	public static final int BYTE_RELATIVEPTR = 4;
	public static final int BYTE_STRLEN = 2;
	public static final int BYTE_CONTENTSTRLEN = 3;
	public static final int BYTE_TERMFREQ = 2;
	public static final int BYTE_DOCFREQ = 3;
	public static final int BYTE_INVINDEXDIFF = 5;

	public static final int FILE_HEADERSIZE = 2;
	public static final int FILE_BODYSIZE = 2;

	public static final int TERM = 0;
	public static final int CONTENT = 1;
	public static final int ALL = 2;

	// default ranking
	public static final int RERANK_DEFAULT = 0;
	public static final int RERANK_TFIDF = 1;
	public static final int RERANK_ID = 2;
	
	public static final int ID_SHIFT = 12;
	public static final int SEQ_SHIFT = 10;
	
	public static final int PERUSER = 100;
	
	public static final int DELETE_TYPE_ID = -1;
	public static final int DELETE_TYPE_CONTENT = 0;
	public static final int DELETE_TYPE_APPENDIX = 1;
	public static final int DELETE_TYPE_MULTIFLAG = 3;
	public static final int DELETE_TYPE_TIME = 4;
}
